// ███╗   ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
// ████╗  ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
// ██╔██╗ ██║██║   ██║   ██║   ██║██║     █████╗  
// ██║╚██╗██║██║   ██║   ██║   ██║██║     ██╔══╝  
// ██║ ╚████║╚██████╔╝   ██║   ██║╚██████╗███████╗
// ╚═╝  ╚═══╝ ╚═════╝    ╚═╝   ╚═╝ ╚═════╝╚══════╝
// -----------------------------------------------
//  
// This file is automatically generated 
// Please do not edit these files manually
// Run the following in the root of the repos:
//
// 		*NIX 		:	./build.sh codegen
// 		Windows 	:	build.bat codegen
//
// -----------------------------------------------
// ReSharper disable RedundantUsingDirective
using System;
using System.Threading;
using System.Threading.Tasks;
using Elasticsearch.Net.Specification.DanglingIndicesApi;

// ReSharper disable once CheckNamespace
// ReSharper disable RedundantTypeArgumentsOfMethod
namespace Nest.Specification.DanglingIndicesApi
{
	///<summary>
	/// Dangling Indices APIs.
	/// <para>Not intended to be instantiated directly. Use the <see cref = "IElasticClient.DanglingIndices"/> property
	/// on <see cref = "IElasticClient"/>.
	///</para>
	///</summary>
	public class DanglingIndicesNamespace : NamespacedClientProxy
	{
		internal DanglingIndicesNamespace(ElasticClient client): base(client)
		{
		}

		/// <summary>
		/// <c>DELETE</c> request to the <c>dangling_indices.delete_dangling_index</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-gateway-dangling-indices.html">https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-gateway-dangling-indices.html</a>
		/// </summary>
		public DeleteDanglingIndexResponse DeleteDanglingIndex(IndexUuid indexUuid, Func<DeleteDanglingIndexDescriptor, IDeleteDanglingIndexRequest> selector = null) => DeleteDanglingIndex(selector.InvokeOrDefault(new DeleteDanglingIndexDescriptor(indexUuid: indexUuid)));
		/// <summary>
		/// <c>DELETE</c> request to the <c>dangling_indices.delete_dangling_index</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-gateway-dangling-indices.html">https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-gateway-dangling-indices.html</a>
		/// </summary>
		public Task<DeleteDanglingIndexResponse> DeleteDanglingIndexAsync(IndexUuid indexUuid, Func<DeleteDanglingIndexDescriptor, IDeleteDanglingIndexRequest> selector = null, CancellationToken ct = default) => DeleteDanglingIndexAsync(selector.InvokeOrDefault(new DeleteDanglingIndexDescriptor(indexUuid: indexUuid)), ct);
		/// <summary>
		/// <c>DELETE</c> request to the <c>dangling_indices.delete_dangling_index</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-gateway-dangling-indices.html">https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-gateway-dangling-indices.html</a>
		/// </summary>
		public DeleteDanglingIndexResponse DeleteDanglingIndex(IDeleteDanglingIndexRequest request) => DoRequest<IDeleteDanglingIndexRequest, DeleteDanglingIndexResponse>(request, request.RequestParameters);
		/// <summary>
		/// <c>DELETE</c> request to the <c>dangling_indices.delete_dangling_index</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-gateway-dangling-indices.html">https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-gateway-dangling-indices.html</a>
		/// </summary>
		public Task<DeleteDanglingIndexResponse> DeleteDanglingIndexAsync(IDeleteDanglingIndexRequest request, CancellationToken ct = default) => DoRequestAsync<IDeleteDanglingIndexRequest, DeleteDanglingIndexResponse>(request, request.RequestParameters, ct);
		/// <summary>
		/// <c>POST</c> request to the <c>dangling_indices.import_dangling_index</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-gateway-dangling-indices.html">https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-gateway-dangling-indices.html</a>
		/// </summary>
		public ImportDanglingIndexResponse ImportDanglingIndex(IndexUuid indexUuid, Func<ImportDanglingIndexDescriptor, IImportDanglingIndexRequest> selector = null) => ImportDanglingIndex(selector.InvokeOrDefault(new ImportDanglingIndexDescriptor(indexUuid: indexUuid)));
		/// <summary>
		/// <c>POST</c> request to the <c>dangling_indices.import_dangling_index</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-gateway-dangling-indices.html">https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-gateway-dangling-indices.html</a>
		/// </summary>
		public Task<ImportDanglingIndexResponse> ImportDanglingIndexAsync(IndexUuid indexUuid, Func<ImportDanglingIndexDescriptor, IImportDanglingIndexRequest> selector = null, CancellationToken ct = default) => ImportDanglingIndexAsync(selector.InvokeOrDefault(new ImportDanglingIndexDescriptor(indexUuid: indexUuid)), ct);
		/// <summary>
		/// <c>POST</c> request to the <c>dangling_indices.import_dangling_index</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-gateway-dangling-indices.html">https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-gateway-dangling-indices.html</a>
		/// </summary>
		public ImportDanglingIndexResponse ImportDanglingIndex(IImportDanglingIndexRequest request) => DoRequest<IImportDanglingIndexRequest, ImportDanglingIndexResponse>(request, request.RequestParameters);
		/// <summary>
		/// <c>POST</c> request to the <c>dangling_indices.import_dangling_index</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-gateway-dangling-indices.html">https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-gateway-dangling-indices.html</a>
		/// </summary>
		public Task<ImportDanglingIndexResponse> ImportDanglingIndexAsync(IImportDanglingIndexRequest request, CancellationToken ct = default) => DoRequestAsync<IImportDanglingIndexRequest, ImportDanglingIndexResponse>(request, request.RequestParameters, ct);
		/// <summary>
		/// <c>GET</c> request to the <c>dangling_indices.list_dangling_indices</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-gateway-dangling-indices.html">https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-gateway-dangling-indices.html</a>
		/// </summary>
		public ListDanglingIndicesResponse List(Func<ListDanglingIndicesDescriptor, IListDanglingIndicesRequest> selector = null) => List(selector.InvokeOrDefault(new ListDanglingIndicesDescriptor()));
		/// <summary>
		/// <c>GET</c> request to the <c>dangling_indices.list_dangling_indices</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-gateway-dangling-indices.html">https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-gateway-dangling-indices.html</a>
		/// </summary>
		public Task<ListDanglingIndicesResponse> ListAsync(Func<ListDanglingIndicesDescriptor, IListDanglingIndicesRequest> selector = null, CancellationToken ct = default) => ListAsync(selector.InvokeOrDefault(new ListDanglingIndicesDescriptor()), ct);
		/// <summary>
		/// <c>GET</c> request to the <c>dangling_indices.list_dangling_indices</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-gateway-dangling-indices.html">https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-gateway-dangling-indices.html</a>
		/// </summary>
		public ListDanglingIndicesResponse List(IListDanglingIndicesRequest request) => DoRequest<IListDanglingIndicesRequest, ListDanglingIndicesResponse>(request, request.RequestParameters);
		/// <summary>
		/// <c>GET</c> request to the <c>dangling_indices.list_dangling_indices</c> API, read more about this API online:
		/// <para></para>
		/// <a href = "https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-gateway-dangling-indices.html">https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-gateway-dangling-indices.html</a>
		/// </summary>
		public Task<ListDanglingIndicesResponse> ListAsync(IListDanglingIndicesRequest request, CancellationToken ct = default) => DoRequestAsync<IListDanglingIndicesRequest, ListDanglingIndicesResponse>(request, request.RequestParameters, ct);
	}
}